
import { withRouter } from "react-router-dom";
import React from 'react'
class Shop extends React.Component {
    goDetail=(id)=>{
        console.log()
        this.props.history.push(`/ShopDetail/${id}`)
    }
    render() {
        return (
            <div>
                    <div onClick={this.goDetail.bind(this,this.props.data.commonId)}>
                        <img src={this.props.data.picUrl} alt=''></img>
                        <p>{this.props.data.goodsCommonName}</p>
                        <p>¥{this.props.data.price}</p>
                    </div>
            </div>
        )
    }
}

export default withRouter(Shop)